﻿//
// Created by 37616 on 2025/11/9.
//

#ifndef FQDOWNLOADER_API_H
#define FQDOWNLOADER_API_H

#include <string>
#include <vector>
#include <nlohmann/json.hpp>

//单本书的结构体
struct Novel {
    std::string book_id; //书本id
    std::string book_name; //书名
    std::string author; //作者
    std::string abstract; //简介
};

//目录结构
struct Chapter {
    std::string chapter_id;
    std::string title;
};

//搜索函数
std::vector<Novel> search_novel(const std::string &keyword, int offset, int _tab = 3);

// 简洁的展示函数
void display_novels(const std::vector<Novel> &novels);

//目录获取
std::vector<Chapter> get_novel_chapter(const std::string book_id);

#endif //FQDOWNLOADER_API_H
